import React from 'react'
import {
    useParams,
    useLocation,
    useNavigate
} from 'react-router-dom'
function Detail() {
    const params=useParams()
    const location=useLocation()
    const navigate=useNavigate()
  return (
    <div>
        <p>location:{location.state.word}</p>
    </div>
  )
}

export default Detail